/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.beautycenter.bean;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 *
 * @author magelinha
 */

@Entity
@Table(name="DIGITAL")
public class Digital implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name="ID_DIGITAL")
    private int idDigital;
    
    @Column(name="DEDO")
    private String dedo;
    
    @Lob @Basic(fetch=FetchType.LAZY)
    @Column(name="DIGITAL", length=16777215) //deixa como mediumBlob
    private byte[] digital;
    
    @ManyToOne
    @JoinColumn(name="ID_CLIENTE", referencedColumnName="ID_PESSOA")
    private Cliente cliente;
    
    public int getIdDigital() {
        return idDigital;
    }

    public void setIdDigital(int idDigital) {
        this.idDigital = idDigital;
    }

    public String getDedo() {
        return dedo;
    }

    public void setDedo(String dedo) {
        this.dedo = dedo;
    }

    public byte[] getDigital() {
        return digital;
    }

    public void setDigital(byte[] digital) {
        this.digital = digital;
    }

    public Cliente getCliente() {
        return cliente;
    }

    public void setCliente(Cliente cliente) {
        this.cliente = cliente;
    }
    
}
